//2009/08/11 01:21:14
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;

class BettingMoney
{
public:
    int moneyMade(vector <int> amounts, vector <int> centsPerDollar, int finalResult)
    {
		int total = 0;
		for(int i=0; i<amounts.size(); i++)
		{
			total += amounts[i];
		}
		return (total - amounts[finalResult]) * 100 - amounts[finalResult] * centsPerDollar[finalResult];
    }
};
